package com.example.gemfire.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.gemfire.expiration.Expiration;
import org.springframework.data.gemfire.mapping.annotation.Region;

import java.io.Serializable;

@Region(value = "Card")
@Expiration(timeout = "1800", action = "INVALIDATE")
public class Card implements Serializable {

    @Id
    private String key;

    private String value;

    public Card() {
    }

    @PersistenceConstructor
    public Card(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
